<?php
/**
 * Created by PhpStorm.
 * User: alinejun
 * Date: 2019/3/6
 * Time: 21:33
 */
namespace app\admin\validate;

/**
 * 美食验证器
 */
class Culture extends AdminBase
{

    // 验证规则
    protected $rule =   [
        'name'          => 'require',
        'content'       => 'require',
        //'category_id'   => 'require',
    ];

    // 验证提示
    protected $message  =   [
        'name.require'         => '美食标题不能为空',
        'content.require'      => '美食内容不能为空',
        //'category_id.require'  => '美食分类必须选择',
    ];

    // 应用场景
    protected $scene = [
        'edit'  =>  ['name', 'content']
    ];
}